package com.tmzh.controller;

import com.tmzh.mapper.InfoMapper;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;


public class InfoService {

    //批量入库成功条数
    public  static   int successCount = 0;
    //批量入库失败条数
    public  static   int errorCount = 0;

    final ExecutorService executorService = Executors.newFixedThreadPool(4);

    private InfoMapper infoMapper;

    // TODO 通过线程池进行保存操作(可选)
    private void saveDB(final Info info) {
        executorService.submit(() -> {
            // TODO 保存到数据库，ID存在则进行更新
        });
    }


}
